﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FuckCore.DAO;
using FuckData.Model;

namespace FuckData.DAO
{
    public class ShareDAO : BaseDAO<GoEasyEntities, tbl_Share>
    {
        public List<ShareModel> GetListShare()
        {
            var Result = from share in ObjectContext.tbl_Share
                         from acc in ObjectContext.tbl_Account
                         where share.AccountID == acc.ID
                         && acc.Status == 1 && share.Status == 1
                         select new ShareModel
                         {
                             ID = share.ID,
                             AccountID = acc.ID,
                             Comment = share.Comment,
                             DateCreate = share.DateCreate,
                             Images = share.Images,
                             Like = share.Likes,
                             Status = share.Status,
                             Title = share.Title,
                             UserName = acc.UserName
                         };
            return null;
        }
    }
}
